﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Commerce/Views/Shared/Backend.Master"
    Inherits="System.Web.Mvc.ViewPage<IEnumerable<IPayment>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%:"Payment".Localize()%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h3 class="title">
        <%:"Payment".Localize() %></h3>
    <div class="command">
        <ul class="clearfix">
         
         <li>
         <a href='<%=  ViewData["sync_action"]  %>' class=button >
             <%: "Sync Addins".Localize()%></a>
         </li>
        </ul>
    </div>
    <div class="table-container">
        <table>
            <thead>
                <tr>
                    <th class="action">
                        <%: "Enabled".Localize() %>
                    </th>
                    <th>
                        <%:"Name".Localize() %>
                    </th>
                    <th>
                        <%: "Headline".Localize()%>
                    </th>
                    <th>
                        <%:"Amount change".Localize()%>
                    </th>
                    <th>
                        <%:"Percent change".Localize() %>
                    </th>
                    <th class="action">
                        <%:"Redirected".Localize()%>
                    </th>
                    <th class="action">
                        <%: "Settings".Localize() %>
                    </th>
                    <th class="action">
                        <%:"Edit".Localize() %>
                    </th>
                </tr>
            </thead>
            <tbody>
                <% 
                    var index = 0;
                    foreach (var item in Model)
                    {
                        index++;
                %>
                <tr <% if (index % 2 == 0) {%>class="even" <%} %>>
                    <td class="action">
                        <a href="#" class="o-icon input-icon <%= item.IsEnable?"tick":"cross" %>"></a>
                    </td>
                    <td>
                        <%: item.MethodName %>
                    </td>
                    <td>
                        <%: item.HeadLine %>
                    </td>
                    <td>
                        <%: item.AmountChange %>
                    </td>
                    <td>
                        <%: item.PercentChange %>
                    </td>
                    <td class="action">
                        <%: Html.DisplayFor(i=>item.IsRedirect) %>
                    </td>
                    <td class="action">
                        <%: Html.ActionLink(" ", "Settings", "Payment", new { Name = item.MethodName }, new { @class = "o-icon setting", title = "settings".Localize() })%>
                    </td>
                    <td class="action">
                        <%: Html.ActionLink(" ", "Edit", "Payment", new { Name = item.MethodName }, new { @class = "o-icon edit", title = "edit".Localize() })%>
                    </td>
                </tr>
                <%
                    }
                %>
            </tbody>
        </table>
    </div>
</asp:Content>
